package com.pig4cloud.pigx.contract.mongo.entity;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import lombok.Data;
import org.springframework.data.annotation.Id;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 一分钟k线 mongo缓存
 */
@Data
public class ContractKLineMongo {

	/**
	 * 主键
	 */
	@Id
	private Long id;

	/**
	 * 币对id
	 */
	private Long symbolId;

	/**
	 * 币对名称
	 */
	private String symbolName;

	/**
	 * 开始时间
	 */
	private LocalDateTime startTime;

	/**
	 * 结束时间
	 */
	private LocalDateTime endTime;

	/**
	 * 开盘价
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal openPrice;

	/**
	 * 收盘价
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal closePrice;

	/**
	 * 最高价
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal highPrice;

	/**
	 * 最低价
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal lowPrice;

	/**
	 * 成交量
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal dealNum;

	/**
	 * 成交额
	 */
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal dealPrice;

	/**
	 * 创建时间
	 */
	private LocalDateTime createTime;

	/**
	 * 创建人
	 */
	private Long createBy;

	/**
	 * 修改时间
	 */
	private LocalDateTime updateTime;

	/**
	 * 修改人
	 */
	private Long updateBy;

	/**
	 * 是否删除（null是、0否）
	 */
	private String isDeleted;


}
